FROM openjdk:17-jdk-oracle

WORKDIR /cicd

ENV SERVER_PORT=8080

EXPOSE ${SERVER_PORT}

ADD ./target/cicd*.jar ./app.jar

ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-Dserver.port=${SERVER_PORT}", "-jar", "app.jar"]